package com.community;

import cn.hutool.crypto.digest.DigestAlgorithm;
import cn.hutool.crypto.digest.Digester;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.boot.web.servlet.ServletComponentScan;

@SpringBootApplication
@MapperScan("com.community.mapper")
@ServletComponentScan
@EnableConfigurationProperties
public class CommunityApplication {

    public static void main(String[] args) {
        String salt="xzcxzvxcvasfsafsaghfdhdfsafasfasfdf";

        //md5 加密算法  单向加密 只能加密不能解密
        String password="123456"+salt;

        Digester md5 = new Digester(DigestAlgorithm.MD5);

        String digestHex = md5.digestHex(password);

        System.out.println(digestHex);

        SpringApplication.run(CommunityApplication.class, args);
    }

}
